<?php 
define('_VIEW_MODEL_','admin');
session_start();
$statu = $_SESSION['statu'];
$linkinfo = "";
$stip  = "请选择.xls文档添加";
require_once("../init.php");
$cont1 = "";
$cont2 = "";
if(!$statu){
	echo "<script>window.parent.location.href='./index.php'</script>";
}
if(isset($act)&&$act=="update"){
	for($i=0;$i<12;$i++){
		$h = 'help'.$i;
		if(!empty($$h)){
			$helpstyle[$i] = $$h; 
		}
		$n = 'novel'.$i;
		if(!empty($$n)){
			$novelstyle[$i] = $$n; 
		}
	}
	$content = "<?";
	$content.="\$helpstyle=".var_export($helpstyle,'true').";\$zomictyle=".var_export($zomictyle,'true').";\$colmustyle=".var_export($colmustyle,'true').
	";\$novelstyle=".var_export($novelstyle,'true').";\$propstyle=".var_export($propstyle,'true');
	$content.="?>";
	file_put_contents("./../include/cache.inc.php",$content);
}
if(count($helpstyle) < 12){
	for($i=count($helpstyle);$i<12;$i++){
	$cont1 .= "<tr><td><input type='text' name='help$i' id='help$i' value='' onblur=checkstye($i,'help')></td></tr>";
	}
}
if(count($novelstyle) < 12){
	for($i=count($novelstyle);$i<12;$i++){
	$cont2 .= "<tr><td><input type='text' name='novel$i' id='novel$i' value='' onblur=checkstye($i,'novel')></td></tr>";
	}
}
$smartyObj->assign('title',$admintitle);
$smartyObj->assign('helppage',$helpstyle);
$smartyObj->assign('nostyle',$novelstyle);
$smartyObj->assign('stip',$stip);
$smartyObj->assign('con1',$cont1);
$smartyObj->assign('con2',$cont2);
$smartyObj->assign('adminname',$adminconfigname);
$smartyObj->display("owenconfig.tpl");
?>